package com.jack.mapper;


import com.jack.pojo.OperateLog;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ReportMapper {

    /**
     * 获取员工职位数据
     * @return
     */
    @MapKey("job")
    List<Map<String,Object>> getEmpJobData();


    /**
     * 获取员工性别数据
     * @return
     */
    @MapKey("gender")
    List<Map<String, Object>> getEmpGenderData();

    /**
     * 班级人数统计
     * @return
     */
    List<Map<String, Object>> getStuCountOfClazzData();


    /**
     * 学生学历统计
     * @return
     */
    List<Map<String, Object>> getStuDegreeData();


    /**
     * 日志分页查询
     * @param page
     * @param pageSize
     * @return
     */
    @Select("select o.*,e.name as operateEmpName from operate_log o inner join emp e on o.operate_emp_id =  e.id")
    List<OperateLog> getLogs(Integer page, Integer pageSize);
}
